package com.microservice.producer.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/produce")
public class ProducerController {

    @GetMapping("/data/{body}")
    public String produceTestData(@PathVariable String body) {
        Date date = new Date();
        return "test data " + body + "    date:" +date.toString();
    }
}
